<!--
 * @Description: 文件的主页面
 * @Author: 56208
 * @Date: 2025/4/18 18:51
 * @LastEditors: 56208
 * @LastEditTime: 2025/4/18 18:51
 * @FilePath: D:/vue3-electron-music/src/renderer/src/view\home.vue
 -->

<template>
  <el-container style="height: 100vh">
    <el-header class="h-100 p-0">
      <Header></Header>
    </el-header>
    <el-main style="flex: 1; overflow: hidden">
      <el-container class="main-class">
        <el-aside width="240px" style="overflow: hidden">
          <leftMenu></leftMenu>
        </el-aside>
        <el-main style="overflow-y: auto">
          <router-view />
        </el-main>
      </el-container>
    </el-main>
    <el-footer class="h-80" style="padding: 0">
      <Player></Player>
    </el-footer>
  </el-container>
</template>

<script setup lang="ts">
import leftMenu from '../components/leftMenu/index.vue'
import Header from '../components/header/index.vue'
import Player from '../components/player/index.vue'
import { useUserStore } from '@renderer/store/userInfo'
import { getCurrentInstance, onMounted } from 'vue'
const { proxy } = getCurrentInstance() as any
const userStore = useUserStore()

onMounted(() => {
  userStore.setLoginStatus(proxy)
})

</script>

<style scoped lang="less">
.main-class {
  height: calc(100vh - 180px);
}
</style>
